#pragma once
#pragma warning( disable : 4244)
#define DIRECTINPUT_VERSION 0x0800
#ifndef _Input_H
#define _Input_H
#include <dinput.h>
#include <d3dx9.h>

#define KEYBOARD_BUFFER_SIZE 1024

class Input
{
private:
	HWND						_hWnd;

	LPDIRECTINPUT8				_dinput;
	LPDIRECTINPUTDEVICE8		_dikeyboard;

	DIDEVICEOBJECTDATA _keyEvents[KEYBOARD_BUFFER_SIZE];

	int _keydown;
	int _keyup;

	char keys[256];
public:
	Input(HWND hWnd);
	~Input();

	bool InitDirectInput();
	void ProcessKeyboard();
	int KeyDown(int keycode);
	int OnKeyDown();
	int OnKeyUp();
};
#endif
